package com.ygkj.demo.view

import android.app.Dialog
import android.content.Context
import android.graphics.Point
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.util.DisplayMetrics
import android.view.*
import android.webkit.WebView
import android.webkit.WebViewClient
import com.ygkj.demo.R
import kotlinx.android.synthetic.main.layout_dialogfull.*


/**
 * 全屏dialog
 * @constructor
 */
class FullScreenDialog(context: Context,var view :View ) : Dialog(context) {

    init {
        initView(context)
    }

    private fun initView(context: Context) {


    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        window?.requestFeature(Window.FEATURE_NO_TITLE)
        var inflate = LayoutInflater.from(context).inflate(R.layout.layout_dialogfull, null)
        setContentView(inflate)

        window?.setBackgroundDrawable(ColorDrawable(0x00000000))
        window?.setLayout(
            WindowManager.LayoutParams.MATCH_PARENT,
            WindowManager.LayoutParams.MATCH_PARENT
        )

        root_view.addView(view)

    }
    override fun show() {
        super.show()

    }

    override fun dismiss() {

        super.dismiss()

    }
}